package study.domain;


import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

//@Configuration
@Component
@PropertySource("classpath:test.properties")
//@EnableConfigurationProperties(Myperperties.class)
@ConfigurationProperties(prefix = "test")
public class Myperperties {

    int id;
    String name;
    //alt+insert
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Myperoperties{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
